<!DOCTYPE html>
<html>
<head>
    <title>加法求和</title>
</head>
<style>
    body {
        font-family: Arial, sans-serif;
        text-align: center;
        margin: 200px auto;
    }
</style>
<body>
    <button onclick="add()">求和</button>
    <input type="text" id="num1" placeholder="请输入第一个数字">
    <input type="text" id="num2" placeholder="请输入第二个数字">
    <p id="result"></p>
    <script>
        function add() {
            var num1 = document.getElementById("num1").value;
            var num2 = document.getElementById("num2").value;
            var result = parseInt(num1) + parseInt(num2);
            document.getElementById("result").innerHTML = result;
        }

    </script>
</body>